﻿using MiniFox.Components;
using MiniFox.Infrastructure;
using MiniFox.Platform.File.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.File.Services
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(FolderService))]
    public interface IFolderService
    {
        /// <summary>
        /// 检查指定路径是否已存在,不存在且可用,则返回true
        /// </summary>
        /// <param name="path">指定路径</param>
        /// <returns></returns>
        void CheckFolderAvaliable(string path);
        ///// <summary>
        ///// 
        ///// </summary>
        ///// <returns></returns>
        //IEnumerable<ITreeNode> FolderTree
        //{
        //    get;
        //}
        /// <summary>
        /// 在指定目录下创建新的子目录
        /// </summary>
        /// <param name="folderName">新目录名称</param>
        /// <param name="superPath">目标父目录</param>
        /// <returns></returns>
        FolderObject Create(string folderName, string superPath);
        /// <summary>
        /// 移动目录到指定目标目录下
        /// </summary>
        /// <param name="folderId">已选择的目录</param>
        /// <param name="superPath">目标父目录</param>
        /// <returns></returns>
        FolderObject Move(string folderId, string superPath);
        /// <summary>
        /// 移除指定目录
        /// </summary>
        /// <param name="path">目录</param>
        void Remove(string path);
        /// <summary>
        /// 重命名指定目录
        /// </summary>
        /// <param name="path">目录ID</param>
        /// <param name="folderName">新目录名称</param>
        /// <returns></returns>
        FolderObject Rename(string path, string folderName);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        FolderObject GetFolder(string path);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        object Query(string path);
        ///// <summary>
        ///// 
        ///// </summary>
        ///// <param name="folderId"></param>
        ///// <param name="superPath"></param>
        ///// <returns></returns>
        //FolderObject Copy(string folderId, string superPath);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="folderId"></param>
        /// <returns></returns>
        ZipFileData Zip(string folderId);
    }
}
